package cn.stylefeng.sharkkeep.until;

import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.HttpClients;

import java.io.IOException;

public class Shutdown {
    public static  void main(String[] args){

        /**
         * 应用关闭入口
         * @author dingzg
         */
        String url = null;
        if (args.length > 0) {
            url = args[0];
        } else {
            return;
        }
        HttpClient httpClient = HttpClients.createDefault();
        HttpPost httpPost = new HttpPost(url);
        try {
            httpClient.execute(httpPost);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
